package com.hxzy.shop.commodity.dto.resp;

import com.hxzy.shop.entity.ClassifiedManagement;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(value = "分类返回参数")
public class ClassifiedManagementResp extends ClassifiedManagement implements Serializable {

    private static final long serialVersionUID = -8864556265870491556L;

    @ApiModelProperty(name = "subClassified", value = "子分类")
    private List<SubClassified> subClassified;
    @ApiModelProperty(name = "drugNum", value = "该分类下所有子分类药品数量")
    private Integer drugNum;
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class SubClassified implements Serializable{
        private static final long serialVersionUID = -8864556265870491558L;

        @ApiModelProperty(name = "id", value = "子分类id")
        private Long id;
        @ApiModelProperty(name = "name", value = "子分类名称")
        private String name;
        @ApiModelProperty(name = "drugNum", value = "该分类下药品数量")
        private Integer drugNum;

        public SubClassified(Long id,String name){
            this.id = id;
            this.name = name;
        }
    }
}